<!-- 题库管理-试卷管理 -->
<div class="manageTitle">
	试卷管理
</div>

<div class="content" ng-controller="examPaperManage">
	<div class="addBtn">
		<span class="title">试卷类型</span>
		<div class="input-group m-b">
		    <div class="input-group-btn dropdown" dropdown="">
		        <button type="button" class="btn btn-default" dropdown-toggle="" aria-haspopup="true"
		        aria-expanded="false">
		            {{nowExamType.name}}
		            <span class="caret">
		            </span>
		        </button>
		        <ul class="dropdown-menu">
		            <li ng-repeat="item in examType" ng-click="selectExamType(item);">
		                <a href="javascript:;">
		                    {{item.name}}
		                </a>
		            </li>
		        </ul>
		    </div>
		</div>


		<span class="title">添加时间</span>
		<div class="input-group m-b col-sm-2 addTitle">
		    <div class="input-group-btn">
		        <button type="button" class="btn btn-default" ng-click="openCalendar($event);">
		        	{{startTime}}<span class="wavyLine">~</span>{{endTime}}
		            <span class="caret"></span>
		        </button>
		        <ul class="dropdown-menu dateSelect" ng-click="openCalendar($event);">
		            <div class="form-group">
		                <div ng-model='timepickerTest' ng-time class="input-group date form_date col-md-5"
		                data-date="" data-date-format="yyyy-mm-dd" data-link-field="dtp_input2"
		                data-link-format="yyyy-mm-dd">
		                    <input class="form-control" size="16" type="text" value="" readonly ng-model="startTime">
		                    <span class="input-group-addon">
		                        <span class="glyphicon glyphicon-calendar"></span>
		                    </span>
		                </div>
		            </div>
		            <span class="wave">
		                ~
		            </span>
		            <div class="form-group">
		                <div ng-model='timepickerTest' ng-time class="input-group date form_date col-md-5 marginLeft"
		                data-date="" data-date-format="yyyy-mm-dd" data-link-field="dtp_input2"
		                data-link-format="yyyy-mm-dd">
		                    <input class="form-control" size="16" type="text" value="" readonly ng-model="endTime">
		                    <span class="input-group-addon">
		                        <span class="glyphicon glyphicon-calendar"></span>
		                    </span>
		                </div>
		            </div>

		            <a href="javascript:;" class="baseBtn" ng-click="closeCalendar($event);">确定</a>
		        </ul>
		    </div>
		</div>

		<a href="javascript:;" class="btnForClass" ng-click="newExamPaper();">新建试卷</a>

		<div class="search">
			<input type="text" placeholder="请输入关键词进行查询搜索" ng-model="searchName" ng-change="getBasicList();">
			<a href="javascript:;">搜索</a>
		</div>
	</div>

	<div class="table">
		<table>
			<thead>
				<tr>
					<th>ID</th>
					<th>试卷名称</th>
					<th>试卷类型</th>
					<th>所属分类</th>
					<th>添加时间</th>
					<th>操作</th>
				</tr>
			</thead>
			<tbody>
				<tr ng-repeat="item in basicList">
					<td>{{item.id}}</td>
					<td>{{item.name}}</td>
					<td>{{item.type_name}}</td>
					<td>{{item.illegal_name}}</td>
					<td>{{item.create_time}}</td>
					<td class="operation">
						<a href="javascript:;" class="testAssembly" ng-click="examPaperManageGeneration(item);">组卷</a>
						<a href="javascript:;"><img src="../img/edit.png" class="edit" ng-click="editExamPaper(item);"></a>
						<a href="javascript:;"><img src="../img/delete.png" ng-click="delExamPaper(item);"></a>
					</td>
				</tr>
				<tr ng-if="noData">
					<td colspan="6"><img src="../img/noData.png" class="height"></td>
				</tr>
			</tbody>
		</table>

		<ul class="pagination"></ul>
	</div>
</div>

<!-- 新建试卷 -->
<script type="text/ng-template" id="newExamPaper.html">
	<div class="panel-body newExamPaper">
	    <form class="form-horizontal" style="border: 0;">
	    	<p class="title">试卷基本信息<span ng-click="closeAddExam();">&times;</span></p>
	    	<p class="info">试卷名称<input type="text" ng-model="name"></p>
	    	<p class="info">
	    		<span class="name">所属分类</span>
				<div class="input-group m-b">
				    <div class="input-group-btn dropdown" dropdown="">
				        <button type="button" class="btn btn-default" dropdown-toggle="" aria-haspopup="true"
				        aria-expanded="false">
				            {{nowIllegal.name}}
				            <span class="caret">
				            </span>
				        </button>
				        <ul class="dropdown-menu">
				            <li ng-repeat="item in selectList.illegal" ng-click="selectIllegal(item);">
				                <a href="javascript:;">
				                    {{item.name}}
				                </a>
				            </li>
				        </ul>
				    </div>
				</div>
	    	</p>

	    	<p class="info">
	    		<span class="name">关联课程</span>
				<div class="input-group m-b">
				    <div class="input-group-btn dropdown" dropdown="">
				        <button type="button" class="btn btn-default" dropdown-toggle="" aria-haspopup="true"
				        aria-expanded="false">
				            {{nowCourse.name}}
				            <span class="caret">
				            </span>
				        </button>
				        <ul class="dropdown-menu">
				            <li ng-repeat="item in selectList.course" ng-click="selectCourse(item);">
				                <a href="javascript:;">
				                    {{item.name}}
				                </a>
				            </li>
				        </ul>
				    </div>
				</div>
	    	</p>

	    	<p class="info">
	    		<span class="name">试卷类型</span>
				<div class="input-group m-b">
				    <div class="input-group-btn dropdown" dropdown="">
				        <button type="button" class="btn btn-default" dropdown-toggle="" aria-haspopup="true"
				        aria-expanded="false">
				            {{nowExamType.name}}
				            <span class="caret">
				            </span>
				        </button>
				        <ul class="dropdown-menu">
				            <li ng-repeat="item in examType" ng-click="selectExamType(item);">
				                <a href="javascript:;">
				                    {{item.name}}
				                </a>
				            </li>
				        </ul>
				    </div>
				</div>
	    	</p>

	    	<p class="info">
	    		<span class="name">试卷描述</span>
				<textarea ng-model="desc"></textarea>
	    	</p>

	    	<p class="info">及格分数<input type="number" min="0" ng-model="passMark"></p>

	    	<p class="info">考试时间<input type="number" min="0" ng-model="time"></p>

	    	<a href="javascript:;" class="baseBtn" ng-click="save();">确定</a>
	    	<a href="javascript:;" class="baseCancelBtn" ng-click="closeAddExam();">取消</a>
	    </form>
	</div>
</script>

<!-- 编辑试卷 -->
<script type="text/ng-template" id="editExamPaper.html">
	<div class="panel-body newExamPaper">
	    <form class="form-horizontal" style="border: 0;">
	    	<p class="title">试卷基本信息<span ng-click="closeAddExam();">&times;</span></p>
	    	<p class="info">试卷名称<input type="text" ng-model="name"></p>
	    	<p class="info">
	    		<span class="name">所属分类</span>
				<div class="input-group m-b">
				    <div class="input-group-btn dropdown" dropdown="">
				        <button type="button" class="btn btn-default" dropdown-toggle="" aria-haspopup="true"
				        aria-expanded="false">
				            {{nowIllegal.name}}
				            <span class="caret">
				            </span>
				        </button>
				        <ul class="dropdown-menu">
				            <li ng-repeat="item in selectList.illegal" ng-click="selectIllegal(item);">
				                <a href="javascript:;">
				                    {{item.name}}
				                </a>
				            </li>
				        </ul>
				    </div>
				</div>
	    	</p>

	    	<p class="info">
	    		<span class="name">关联课程</span>
				<div class="input-group m-b">
				    <div class="input-group-btn dropdown" dropdown="">
				        <button type="button" class="btn btn-default" dropdown-toggle="" aria-haspopup="true"
				        aria-expanded="false">
				            {{nowCourse.name}}
				            <span class="caret">
				            </span>
				        </button>
				        <ul class="dropdown-menu">
				            <li ng-repeat="item in selectList.course" ng-click="selectCourse(item);">
				                <a href="javascript:;">
				                    {{item.name}}
				                </a>
				            </li>
				        </ul>
				    </div>
				</div>
	    	</p>

	    	<p class="info">
	    		<span class="name">试卷类型</span>
				<div class="input-group m-b">
				    <div class="input-group-btn dropdown" dropdown="">
				        <button type="button" class="btn btn-default" dropdown-toggle="" aria-haspopup="true"
				        aria-expanded="false">
				            {{nowExamType.name}}
				            <span class="caret">
				            </span>
				        </button>
				        <ul class="dropdown-menu">
				            <li ng-repeat="item in examType" ng-click="selectExamType(item);">
				                <a href="javascript:;">
				                    {{item.name}}
				                </a>
				            </li>
				        </ul>
				    </div>
				</div>
	    	</p>

	    	<p class="info">
	    		<span class="name">试卷描述</span>
				<textarea ng-model="desc"></textarea>
	    	</p>

	    	<p class="info">及格分数<input type="number" min="0" ng-model="passMark"></p>

	    	<p class="info">考试时间<input type="number" min="0" ng-model="time"></p>

	    	<a href="javascript:;" class="baseBtn" ng-click="save();">确定</a>
	    	<a href="javascript:;" class="baseCancelBtn" ng-click="closeAddExam();">取消</a>
	    </form>
	</div>
</script>